import {createRouter,createWebHistory} from 'vue-router'

const HomeView =()=> import('../views/home/HomeView')
const VideoDetail = ()=> import('../views/detail/VideoDetail')
const routes=[
    {
        path:'/',
        redirect:'/home'
    },
    {
        path:'/home',
        component:HomeView
    },
    {
        path:'/detail',
        component:VideoDetail
    }
]

const router=new createRouter({
    routes:routes,
    history:createWebHistory()
})

export default router